/*
 * Created on Nov 3, 2003
 *
 * To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
package org.vectrics.recruiter.struts;

import java.util.Collection;

import org.vectrics.hibernate.ThreadProperties;
import org.vectrics.provider.CoreServiceLocator;
import org.vectrics.recruiter.config.RecruitConfig;
import org.vectrics.struts.Request;
import org.vectrics.user.web.struts.UserProfileForm;

public class NewUserLoginProfileForm extends UserProfileForm {
	
	public static final long serialVersionUID = 423634643245L;
	
	protected void onError(Request request) {
		Collection passwordHintQuestions =
			CoreServiceLocator.getPersonService().findAllPasswordHintQuestions();
		request.setAttribute("hintQuestions", passwordHintQuestions);
	}
	
	protected boolean getPasswordRequired() {
		return(true);
	}

	protected boolean getNewUserNameRequired() {
		return(true);
	}

	protected boolean getUserNameRequired() {
		return(true);
	}

	protected boolean getEmailRequired() {
		return(true);
	}

	protected boolean getNameRequired() {
		return(true);
	}
	
	protected boolean getFirstNameRequired() {
		return(true);
	}
	
	protected boolean getLastNameRequired() {
		return(true);
	}
	
	protected boolean getPasswordHintRequired() {
		boolean allowPasswordEmail = RecruitConfig.getRecruitInstance()
					.getAllowPasswordEmail(ThreadProperties.getDomain());
		return(allowPasswordEmail);
	}

	protected boolean getCompanyRequired() {
		return(false);
	}

}
